<?php namespace Zmsun\View\Module\Param;class Link extends AParam{public function getValue(){return trim($this->xmlElement);}public function setValue($value){$this->xmlElement[0]=$value;}public function getHtml(){$label=$this->getAttribute('label');$name=$this->getAttribute('name');$tips=$this->getTipsHtml($this->getAttribute('description'));$value=$this->getValue();$parts=explode('|',$value);$partsLen=count($parts);$linkHref=$linkName='';if($partsLen>1){$linkHref=htmlspecialchars($parts[0]);$linkName=htmlspecialchars($parts[1]);}elseif($partsLen==1){$linkHref=$linkName=htmlspecialchars($parts[0]);}return <<<S
<div class="control-group">
	<label class="control-label" for="">{$label}</label>
	<div class="control">
		<a href="$linkHref" class="param-link" target="_blank">$linkName</a>
		<input type="hidden" class="J_articleData" name="{$name}" value="{$value}">
		{$tips}
	</div>
</div>
S;
}}?>